import { ProFormDependency, ProFormSlider } from '@ant-design/pro-form';
import type { DividerValue } from '..';
import WrapperForm from '../../wrapperForm';

interface ITitleFormProps {
  data: DividerValue;
}

const TitleForm: React.FunctionComponent<ITitleFormProps> = (props) => (
  // @ts-ignore
  <WrapperForm<DividerValue> {...props}>
    <ProFormSlider
      label={
        <ProFormDependency name={['height']}>
          {({ height }) => `高度: ${height}px`}
        </ProFormDependency>
      }
      required
      name="height"
      min={0}
    />
  </WrapperForm>
);

export default TitleForm;
